"""
数据文件下载下来名称复杂，运行代码对文件进行批量重命名
这里的数据名称已经重命名了
"""

import os


if __name__ == '__main__':
    path = "./data"
    for dir_name in os.listdir(path):
        num = 1
        book_path = path + "/" + dir_name
        for book in os.listdir(book_path):
            os.rename(os.path.join(book_path, book), os.path.join(book_path, dir_name + '-' + str(num)) + ".docx")
            num += 1
